import { makeObservable, action, observable, runInAction } from "mobx";
import Unit from "../unit";
class Store {
  constructor() {
    makeObservable(this);
  }
  @observable data = [];
  @observable name = "hhh";

  @action
  getData = (ajaxCfg) => {
    Unit.getApi(ajaxCfg).then((res) => {
      this.data = res.data.data;
    });
  };
}

export default Store;
